/*
    1.定义枚举类，枚举出日志等级
    2.提供转换接口，将枚举类型转换成对应字符串
*/
#pragma once

namespace iceLogs
{
    class logLevel
    {
        public:
            enum class value
            {
                UNKNOW = 0,
                DEBUG,
                INFO,
                WARG,
                ERROR,
                FATAL,
                OFF
            };

            static const char* toString(iceLogs::logLevel::value level)
            {
                switch(level)
                {
                    case iceLogs::logLevel::value::DEBUG : return "DEBUG";
                    case iceLogs::logLevel::value::INFO : return "INFO";
                    case iceLogs::logLevel::value::WARG : return "WARG";
                    case iceLogs::logLevel::value::ERROR : return "ERROR";
                    case iceLogs::logLevel::value::FATAL : return "FATAL";
                    case iceLogs::logLevel::value::OFF : return "OFF";

                }
                return "UNKNOW";
            }
    };
}